
public class Date {
	private int year;	
	private int month;
	private int day;
	Date(){
		year=1970;
		month=1;
		day=1;
	}
	Date(int year,int month,int day){
		this.year=year;
		this.month=month;
		this.day=day;
	}
	public void showDate(){
		System.out.println(year+"/"+month+"/"+day);
	}
	public Date tomorrow(){
		day++;
		if(day>daysInmonth()){
			day=1;
			month++;
			if(month>12){
				month=1;
				year++;
			}
		}
		return this;
	}
	public int daysInmonth(){
		switch(month){
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:
			return 31;
		case 4:
		case 6:
		case 9:
		case 11:
			return 30;
			default:
				if(year%4==0&&year%100!=0||year%400==0){
					return 29;
				}else{
					return 28;
				}
		}
	}
	
}
